#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

//qt自带
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
#include <QMessageBox>
#include <QDebug>
#include <QTimer>
#include <QThread>
#include <QDateTime>
#include <stdbool.h>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void Read_Data();

private:
    Ui::MainWindow *ui;
    QSerialPort *my_com;
    QByteArray buf;
    QTimer *timer;
    bool bClosing=false;
    unsigned int byteLen;
    double a[4],w[4],h[4],Angle[4],Port[4];
    double Temperature,Pressure,Altitude;
};

#endif // MAINWINDOW_H
